package com.data.common;

public enum SystemCodeEnum {


    /**
     *  response code
     */
    SYSTEM_OK(0, "success"),
    SYSTEM_ERROR(500, "网络错误，请稍候再试"),
    SYSTEM_NOT_LOGIN(302, "请先登录！"),
    SYSTEM_USER_DISABLE_LOGIN(303, "账号已禁用！"),
    SYSTEM_BAD_REQUEST(403, "请求频率过快,请稍后再试"),
    SYSTEM_NO_AUTH(401, "无权操作"),
    SYSTEM_REGISTER(402, "当前劳动者已存在，请勿重复提交"),
    SYSTEM_ERROR_VERIFICATION(406, "验证码错误"),
    SYSTEM_NO_FOUND(404, "资源未找到"),
    SYSTEM_NO_VALID(400, "参数验证错误"),
    SYSTEM_METHOD_ERROR(405, "请求方式错误"),
    SYSTEM_REQUEST_TIMEOUT(408, "请求超时"),
    SYSTEM_SERVER_ERROR(1001, "服务调用异常"),
    SYSTEM_NO_SUCH_PARAMENT_ERROR(1003, "参数不存在!"),
    SYSTEM_UPLOAD_FILE_ERROR(1004, "文件上传失败!"),
    SYSTEM_WX_PUSH_MSG_ERROR(1005, "account用户不存在"),
    SYSTEM_WX_PUSH_MSG(1006, "小汇还在学习中，暂无合适人选推荐"),
    SYSTEM_All_MSG(1007, "%s");

    private int code;
    private String msg;

    private SystemCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    public static SystemCodeEnum parse(Integer status) {
        SystemCodeEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            SystemCodeEnum value = var1[var3];
            if (value.getCode() == status) {
                return value;
            }
        }

        return SYSTEM_ERROR;
    }
}
